<template>
<div class="mui-content" >
  <div  v-if="detailData.ResourceStoreAttas.length>0"
        v-for="(item,index) in detailData.ResourceStoreAttas"
        :key="index">
    <div class="infoTitle1">{{item.FileName}}</div>
    <div class="infoWrapper">

      <div class="infoTitle">文件大小:{{item.AttaSize}}</div>
      <div class="infoTitle">文件类型:{{item.FileName.split('.')[1]}}</div>
      <div class="infoRight" @click="downLoad(item.PB_ComAttSN)">下载</div>
      <a class="infoRight" @click="chek" :href=item.LUrl>查看</a>
    </div>
  </div>
  <Prompt
    title="错误"
    msg="登陆过期,请重新登录"
    confirm="确定"
    v-on:confirm1="confirm1($event)"
    v-if="mistake"
  >
  </Prompt>
</div>
</template>

<script>
  import Prompt from '../common/Prompt'
    export default {
      name: "Append.vue",
      components:{
        Prompt
      },
      data(){
        return{
          mistake:false
        }
      },
      props: {
        detailData: {
          type: Object,
          default: {}
        },
      },
      methods: {
        downLoad(item) {
          //
          // this.$emit('downLoad');
          // let me = this;
          // me.$Global.zcServer.DownOss({
          //   FileSN: item
          // });
          // alert(item)
          let Server = "http://" + window.location.host + "/";
          window.open(Server+'PageService/doOSSDownload.ashx?pSN=' + item);
        },
        chek() {
          this.$emit('chek')
        }
      }
    }

</script>

<style scoped>

  .mui-content .infoTitle1{
    margin-top: 10px;
    padding-left: 2%;
    height: 2.5rem;
    line-height: 3.5rem;
    background-color: white;
  }
  .mui-content .infoWrapper{
  width: 100%;
  padding: 0 2%;
  background-color: white;
  height: 2.7rem;
line-height: 2.7rem;
    border-bottom: 1px solid gainsboro;

}
.mui-content .infoWrapper .infoTitle{
  float: left;
  font-size: 0.9rem;
  color: #8f8f94;
  margin-right: 2rem;
  text-align: center;
  /*margin-top: 10px;*/
  /*display: inline-block;*/
}
.mui-content .infoWrapper .infoRight{
float: right;
  font-size: 14px;
  margin-left: 10px;
  color:rgb(70,180,250);
  /*display: inline-block;*/
}
</style>
